<?php
namespace Mouta\AmistateBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use Mouta\AmistateBundle\utils\Strings;
use Symfony\Component\Security\Core\User\UserInterface;

/**
 * Mouta\AmistateBundle\Entity
 * 
 * @ORM\Table(name="tags",indexes={ @ORM\Index(name="itag_google", columns={"tag_google"}), @ORM\Index(name="iid_form", columns={"id_form"}) })
 * @ORM\Entity(repositoryClass="Mouta\AmistateBundle\Entity\TagsRepository")
 */
class Tags
{
    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    protected $id;

    /**
     * @ORM\Column(type="string", unique=true)
     * @Assert\NotBlank()
     */
    protected $tag;

    /**
     * @ORM\Column(type="string", unique=true)
     * @Assert\NotBlank()
     */
    protected $tag_google;

    /**
     * @ORM\Column(type="integer")
     * @Assert\NotBlank()
     */
    protected $id_form;

    /**
     * @ORM\Column(type="boolean")
     */
    protected $validado;

    /**
     * @ORM\ManyToMany(targetEntity="Usuario", mappedBy="tags")
     */
    protected $usuarios;
    
    public function __construct()
    {
        $this->usuarios = new \Doctrine\Common\Collections\ArrayCollection();
    }
    
    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set tag
     *
     * @param string $tag
     */
    public function setTag($tag)
    {
        $this->tag = $tag;
    }

    /**
     * Get tag
     *
     * @return string 
     */
    public function getTag()
    {
        return $this->tag;
    }

    /**
     * Set tag_google
     *
     * @param string $tagGoogle
     */
    public function setTagGoogle($tagGoogle)
    {
        $this->tag_google = $tagGoogle;
    }

    /**
     * Get tag_google
     *
     * @return string 
     */
    public function getTagGoogle()
    {
        return $this->tag_google;
    }

    /**
     * Set id_form
     *
     * @param integer $idForm
     */
    public function setIdForm($idForm)
    {
        $this->id_form = $idForm;
    }

    /**
     * Get id_form
     *
     * @return integer 
     */
    public function getIdForm()
    {
        return $this->id_form;
    }

    /**
     * Add usuarios
     *
     * @param Mouta\AmistateBundle\Entity\Usuarios $usuarios
     */
    public function addUsuarios(\Mouta\AmistateBundle\Entity\Usuario $usuarios)
    {
        $this->usuarios[] = $usuarios;
    }

    /**
     * Get usuarios
     *
     * @return Doctrine\Common\Collections\Collection 
     */
    public function getUsuarios()
    {
        return $this->usuarios;
    }

    /**
     * Add usuarios
     *
     * @param Mouta\AmistateBundle\Entity\Usuario $usuarios
     */
    public function addUsuario(\Mouta\AmistateBundle\Entity\Usuario $usuarios)
    {
        $this->usuarios[] = $usuarios;
    }

    /**
     * Set validado
     *
     * @param boolean $validado
     */
    public function setValidado($validado)
    {
        $this->validado = $validado;
    }

    /**
     * Get validado
     *
     * @return boolean 
     */
    public function getValidado()
    {
        return $this->validado;
    }
}